import { loginreq, req, reqImg } from './base';

// 登录接口
export const login = (params) => { return loginreq("post", "/tapi/account/login/admin", params) };

// 图片
export const uploadImageUrl = '/tapi/file/upload/img';
export const uploadImagePngUrl = '/tapi/file/upload/rgba';

export const uploadImage = (params) => { return reqImg("post", uploadImageUrl, params) };
export const uploadImagePng = (params) => { return reqImg("post", uploadImagePngUrl, params) };

// 账号
export const userList = (params) => { return req("get", "/tapi/account/user_list", params) };

// 考证 列表 报名列表 详情 添加 更新 打开 关闭
export const activityList = (params) => { return req("get", "/tapi/activity/list", params) };
export const activityListSearch = (params) => { return req("get", "/tapi/activity/list/search", params) };
export const activityDetail = (params) => { return req("get", "/tapi/activity/detail/admin", params) };
export const activityModeList = () => { return req("get", "/tapi/activity/choices/mode") };
export const activityIssueList = () => { return req("get", "/tapi/activity/choices/issue_unit") };
export const activityAdd = (params) => { return req("post", "/tapi/activity/add", params) };
export const activityUpdate = (params) => { return req("post", "/tapi/activity/update", params) };
export const activityOpen = (params) => { return req("post", "/tapi/activity/open", params) };
export const activityClose = (params) => { return req("post", "/tapi/activity/close", params) };
export const activitynGradeList = () => { return req("get", "/tapi/application/choices/grade") };

// 报名者
export const activityApplicationList = (params) => { return req("get", "/tapi/application/list/activity", params) };
export const activityApplicationAllList = (params) => { return req("get", "/tapi/application/list", params) };
export const activityApplicationAllListSearch = (params) => { return req("get", "/tapi/application/list/search", params) };
export const activityApplicationUpdate = (params) => { return req("post", "/tapi/application/update", params) };
export const activityApplicationDetail = (params) => { return req("get", "/tapi/application/detail", params) };

// 题库
export const questionList = (params) => { return req("get", "/tapi/question/list", params) };
export const questionListSearch = (params) => { return req("get", "/tapi/question/list/search", params) };
export const questionListUseless = (params) => { return req("get", "/tapi/question/list/useless", params) };
export const questionTypeList = () => { return req("get", "/tapi/question/choices/type") };
export const questionGradeList = () => { return req("get", "/tapi/question/choices/belong_grade") };
export const schoolGradeList = () => { return req("get", "/tapi/application/choices/school_grade") };
export const questionAdd = (params) => { return req("post", "/tapi/question/add", params) };
export const questionUpdate = (params) => { return req("post", "/tapi/question/update", params) };
export const questionOpen = (params) => { return req("post", "/tapi/question/open", params) };
export const questionClose = (params) => { return req("post", "/tapi/question/close", params) };


// 证书 certificate
export const certificateList = (params) => { return req("get", "/tapi/certificate/list", params) };
export const certificateListSearch = (params) => { return req("get", "/tapi/certificate/list/search", params) };
export const certificateDetail = (params) => { return req("get", "/tapi/certificate/detail", params) };
export const certificateUsed = (params) => { return req("get", "/tapi/certificate/no_num/check_has_used", params) };
export const certificateAddG = (params) => { return req("post", "/tapi//certificate/add/grading_certificate", params) };
export const certificateUpdateG = (params) => { return req("post", "/tapi/certificate/update/grading_certificate", params) };
export const certificateAddA = (params) => { return req("post", "/tapi//certificate/add/academic_transcript", params) };
export const certificateUpdateA = (params) => { return req("post", "/tapi/certificate/update/academic_transcript", params) };
export const certificateOpen = (params) => { return req("post", "/tapi/certificate/useful", params) };
export const certificateClose = (params) => { return req("post", "/tapi/certificate/useless", params) };
export const certificateNonumUsed = (params) => { return req("get", "/tapi/certificate/no_num/check_has_used", params) };
